using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class OCTMap : EntityTypeConfiguration<OCT>
    {
        public OCTMap()
        {
            // Primary Key
            this.HasKey(t => t.OT_ID);

            // Properties
            this.Property(t => t.OT_Name)
                .HasMaxLength(50);

            this.Property(t => t.OT_mm)
                .HasMaxLength(20);

            this.Property(t => t.OT_TargetLesion)
                .HasMaxLength(50);

            this.Property(t => t.OT_Time)
                .HasMaxLength(50);

            this.Property(t => t.OT_Result)
                .HasMaxLength(200);

            this.Property(t => t.OT_Remark)
                .HasMaxLength(200);

            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.Create_Time)
                .HasMaxLength(50);

            this.Property(t => t.OT_OtherTargetText)
                .HasMaxLength(50);

            this.Property(t => t.OT_LesionTag)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("OCT");
            this.Property(t => t.OT_ID).HasColumnName("OT_ID");
            this.Property(t => t.OT_Name).HasColumnName("OT_Name");
            this.Property(t => t.OT_mm).HasColumnName("OT_mm");
            this.Property(t => t.OT_TargetLesion).HasColumnName("OT_TargetLesion");
            this.Property(t => t.OT_Time).HasColumnName("OT_Time");
            this.Property(t => t.OT_Result).HasColumnName("OT_Result");
            this.Property(t => t.OT_Remark).HasColumnName("OT_Remark");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.Create_Time).HasColumnName("Create_Time");
            this.Property(t => t.State).HasColumnName("State");
            this.Property(t => t.OT_OtherTargetText).HasColumnName("OT_OtherTargetText");
            this.Property(t => t.Target_ID).HasColumnName("Target_ID");
            this.Property(t => t.OT_NID).HasColumnName("OT_NID");
            this.Property(t => t.OT_LesionTag).HasColumnName("OT_LesionTag");
        }
    }
}
